<template>
  <div class="word">
    <ul>
         <li v-for="(item2,index2) in list2" :key="index2" :class="{active2:currIndex2==index2}" @click="show(item2.url,index2)">
        <p>{{item2.title}}</p>
      </li>
    </ul>
    <router-view></router-view>

  </div>
</template>

<script>
export default {
  name:"Word",
   data(){
    return {
       list2:[{url:"/quan",title:"全局参数设置"},{url:"/leave",title:"离线文档"},{url:"/person",title:"个性化设置"}],
       currIndex2:null,
      
    }
  },
   methods:{
      show(v,i){
       this.$router.push("/word"+v)
       this.currIndex2=i
    }
   },
}
</script>

<style scoped>
ul{
    height: 300px;
}
li{
  height: 40px;
  line-height: 40px;
  text-align: left;
  text-indent: 40px;

}
.active2{
  background: blueviolet;
  color: #fff;
}
</style>